<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ include file="/includes/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加用户</title>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/common.css" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript" src="<%=request.getContextPath()%>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
	var type = '${type}';
	if(type=='add'){
		alert("教师添加成功！");
	}
</script>
</head>
	<body>
		<div id="man_zone">
		<form action="saveTeacher.action" method="post" id="form1" >
		 <!-- 
			<input type="hidden"  name="user.id" value="${user.id}"/>
			<input type="hidden"  name="user.version" value="${user.version}"/>
		  -->
		 <table class="table_style" border="0" align="center"  cellpadding="3" cellspacing="1" width="800px">
		   	<tr>
		   		<td class="left_title_1">教师名称:</td>
		   		<td>
		   		<input type="text" id="teacher.name" name="teacher.name" value="${teacher.name}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('teacher.name') != null">
					<s:fielderror><s:param>teacher.name</s:param></s:fielderror>
				</s:if>
		   		</td>
		   		<td class="left_title_1">邮箱:</td>
		   		<td>
		   		<input type="text" id="teacher.email" name="teacher.email" value="${teacher.email}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('teacher.email') != null">
					<s:fielderror><s:param>teacher.email</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   	</tr>
		   	<tr>
		   		<td class="left_title_1">电话:</td>
		   		<td>
		   		<input type="text" id="teacher.tel" name="teacher.tel" value="${teacher.tel}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.tel') != null">
					<s:fielderror><s:param>teacher.tel</s:param></s:fielderror>
				</s:if>
		   		</td>
		   		<td class="left_title_1">手机:</td>
		   		<td>
		   		<input type="text" id="teacher.phone" name="teacher.phone" value="${teacher.phone}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('teacher.phone') != null">
					<s:fielderror><s:param>teacher.phone</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   	</tr>
		   	<tr>
		   		<td class="left_title_1">教师编号:</td>
		   		<td>
		   		<input type="text" id="teacher.teacherNo" name="teacher.teacherNo" value="${teacher.teacherNo}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('teacher.teacherNo') != null">
					<s:fielderror><s:param>teacher.teacherNo</s:param></s:fielderror>
				</s:if>
				<s:actionerror/>
		   		</td>
		   		<td class="left_title_1">地址:</td>
		   		<td>
		   		<input type="text" id="teacher.address" name="teacher.address" value="${teacher.address}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('teacher.address') != null">
					<s:fielderror><s:param>teacher.address</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   	</tr>
		   	<tr>
		   		<td class="left_title_1">性别:</td>
		   		<td>
			        <input name="teacher.sex" type="radio" value="0" checked="checked" />男 
					<input type="radio" name="teacher.sex" value="1"/>女
				 <s:if test="hasFieldErrors() && fieldErrors.get('teacher.sex') != null">
					<s:fielderror><s:param>teacher.sex</s:param></s:fielderror>
				</s:if>
		   		</td>
		   		<td class="left_title_1">密码:</td>
		   		<td>
		   		<input type="text" id="teacher.password" name="teacher.password" value="${teacher.password}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('teacher.password') != null">
					<s:fielderror><s:param>teacher.password</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   	</tr>
		   	<tr>
		   		<td class="left_title_1">生日:</td>
		   		<td>
		   		<input type="text" id="teacher.birthDate" name="teacher.birthDate" value="<s:date name="teacher.birthDate" format="yyyy-MM-dd"/>" onClick="WdatePicker()" readonly/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('teacher.birthDate') != null">
					<s:fielderror><s:param>teacher.birthDate</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   		<td colspan="2"></td>
		   	</tr>
        <tr>   	
        </tr>
		  </table>
		  <table class="table_style" border="0" align="center"  cellpadding="3" cellspacing="0">
       		<tr>
         <td>
          <input type="submit" value="提交" />
          <span class="sub_sp">&nbsp;</span>
          <s:reset value="重置"/>  
         </td>
       </tr>
	</table>
		</form>
		</div>
	</body>
</html>